export const tableOption = {
  labelPosition: "right",
  labelSuffix: "：",
  labelWidth: 130,
  gutter: 0,
  menuBtn: true,
  submitBtn: true,
  submitText: "提交",
  emptyBtn: true,
  menuPosition: "center",
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  searchMenuSpan: 24,
  addBtn: false,
  cellBtn: true,
  menu: true,
  menuWidth: 100,
  searchEnter: true,
  height: "60vh",
  searchIndex: 4,
  searchSpan: 4,
  searchIcon: true,
  searchMenuPosition: "center",
  column: [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12,
      search: true,
    },
    {
      type: "input",
      label: "品号",
      prop: "itemCode",
      span: 12,
      search: true,
    },
    /*    {
      type: "select",
      label: "车间名称",
      prop: "workshopId",
      span: 12,
      dicUrl: "/admin-api/o3-pfoc/workshop/getWorkshopList",
      dicMethod: "get",
      props: {
        label: "workshopName",
        value: "id"
      },
    },*/
    {
      type: "input",
      label: "车间",
      prop: "workshopName",
      span: 12,
      search: true,
    },
    /*{
      type:"select",
      label: "产线",
      prop: "productLineId",
      span: 12,
      display: false,
      hide:false,
      dicData:[],
      dicUrl: '/admin-api/o3-pfoc/realityproductlinemain/getLineList',
      props: {
        label: "realityLineName",
        value: "id"
      },
      dicMethod: "get",

    },*/
    {
      type: "input",
      label: "产线",
      prop: "productLineName",
      span: 12,
      search: true,
    },
    {
      type: "input",
      label: "流程图号",
      prop: "flowChartNo",
      span: 12,
      search: true,
    },
    {
      type: "input",
      label: "工位",
      prop: "workPositionName",
      span: 12,
      search: true,
    },
    {
      type: "input",
      label: "工段",
      prop: "workshopSection",
      span: 12,
      search: true,
    },
    {
      type: "input",
      label: "工序",
      prop: "processName",
      span: 12,
      search: true,
    },
    {
      type: "input",
      label: "产品类型",
      prop: "productLineType",
      span: 12,
    },
    {
      type: "input",
      label: "在制品完成数量",
      prop: "workInProgressQty",
      span: 12,
      width: 130,
      cell: true,
    },
    {
      type: "input",
      label: "在制品报废数量",
      prop: "workInProgressScrapQty",
      span: 12,
      width: 150,
      cell: true,
    },
    {
      type: "input",
      label: "返工数量",
      prop: "reworkQty",
      span: 12,
      cell: true,
    },
    {
      type: "select",
      label: "工位状态",
      prop: "moStatus",
      span: 12,
      html: true, //配置html设置为true即可支持formatter转义html代码
      dicData: [
        {
          label: "未完工",
          value: "未完工",
        },
        {
          label: "已完工",
          value: "已完工",
        },
      ],
      formatter: (val) => {
        if (val.moStatus == "未完工") {
          return '<b style="color:red">未完工</b>';
        } else if (val.moStatus == "已完工") {
          return '<b style="color:green">已完工</b>';
        }
      },
      cell: true,
    },
    {
      type: "input",
      label: "报工时间",
      prop: "reportTime",
      span: 12,
      format: "yyyy-MM-dd HH:mm:ss",
      valueFormat: "yyyy-MM-dd HH:mm:ss",
    },
    {
      type: "input",
      label: "报工人",
      prop: "reportBy",
      span: 12,
    },
  ],
};
